﻿<local:KeyedWindowBase x:Class="AddObjectView"
                       xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                       xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                       xmlns:local="clr-namespace:RawExplorer2.UI"
                       xmlns:tokenlib="clr-namespace:RawExplorer2.TokenLib;assembly=TokenLib"
                       Title="New Object"
                       Width="350"
                       Height="250">
	<Window.DataContext>
		<local:AddObjectVm />
	</Window.DataContext>
	<Grid Margin="4">
		<Grid.ColumnDefinitions>
			<ColumnDefinition Width="Auto" />
			<ColumnDefinition Width="*" />
		</Grid.ColumnDefinitions>
		<Grid.RowDefinitions>
			<RowDefinition Height="Auto" />
			<RowDefinition Height="Auto" />
			<RowDefinition Height="Auto" />
			<RowDefinition Height="Auto" />
			<RowDefinition Height="*" />
			<RowDefinition Height="Auto" />
		</Grid.RowDefinitions>
		<Label Grid.Row="0"
		       Grid.Column="0"
		       Margin="4"
		       HorizontalAlignment="Right">
			Object ID:
		</Label>
		<TextBox Grid.Row="0"
		         Grid.Column="1"
		         Margin="4"
		         Text="{Binding Path=ObjectId}" />
		<Label Grid.Row="1"
		       Grid.Column="0"
		       Margin="4">
			Type:
		</Label>
		<ComboBox Grid.Row="1"
		          Grid.Column="1"
		          Margin="4"
		          IsReadOnly="{Binding Path=IsTypeLocked}"
		          ItemsSource="{Binding Path=ObjectTypes}"
		          SelectedItem="{Binding Path=SelectedObjectType}" />
		<Label Grid.Row="2"
		       Grid.Column="0"
		       Margin="4">
			SubType:
		</Label>
		<ComboBox Grid.Row="2"
		          Grid.Column="1"
		          Margin="4"
		          IsReadOnly="{Binding Path=IsTypeLocked}"
		          ItemsSource="{Binding Path=ObjectSubTypes}"
		          SelectedItem="{Binding Path=SelectedObjectSubType}" />
		<Label Grid.Row="3"
		       Grid.Column="0"
		       Margin="4">
			Source:
		</Label>
		<ComboBox Grid.Row="3"
		          Grid.Column="1"
		          Margin="4"
		          DisplayMemberPath="Path"
		          ItemsSource="{Binding Path=Sources}"
		          SelectedItem="{Binding Path=SelectedSource}" />
		<StackPanel Grid.Row="5"
		            Grid.Column="1"
		            Margin="4"
		            HorizontalAlignment="Right"
		            Orientation="Horizontal">
			<Button MinWidth="72"
			        Margin="4"
			        Command="{Binding Path=AddCommand}"
			        IsDefault="True">
				Add
			</Button>
			<Button MinWidth="72"
			        Margin="4"
			        IsCancel="True">
				Cancel
			</Button>
		</StackPanel>
	</Grid>
</local:KeyedWindowBase>
